module.exports = finalHandle;

function finalHandle (tpl) {
  return handleReplace(tpl, {
    dataCode: "",
    mountedCode: "",
    methodsCode: "",
    templateCode: "",
    styleCode: "",
    
    methodsCodeFirst: "",
    methodsCodeSecond: "",
    tipsText: "",

    //表格特有方法
    tableDefaultMounted: "",
    tableDefaultMethods: "",
  })
}

//模板替换
function handleReplace (tpl, opt) {
  return tpl.replace(/{{{(.*?)}}}/g, (node, key) => {
    return opt[key];
  })
}